import { download } from '@/utils/request.js'
import { parseTime } from '@/utils/index'
export default {
  methods: {
    exportExcel: function(params) {
      return download({
        url: this.exportUrl,
        method: 'GET',
        params
      })
    },
    formatDefaultTime() {
      const now = new Date()
      const startTime = parseTime(new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0))
      const endTime = parseTime(new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59))
      return [startTime, endTime]
    }
  }
}
